package com.kawa.kemanage.service.impl;

import com.kawa.kemanage.mapper.NewsLikesMapper;
import com.kawa.kemanage.service.NewsLikesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class NewsLikesServiceImpl implements NewsLikesService {
    @Autowired
    private NewsLikesMapper newsLikesMapper;
    //取消喜欢
    @Override
    public boolean delectLike(Integer like_id) {
        return newsLikesMapper.delectLike(like_id)>0;
    }

    //根据新闻id查看点赞数
    @Override
    public Long getLikeCount(Integer content_id) {
        return newsLikesMapper.getLikeCount(content_id);
    }
}
